package com.cl.pattern.builder.part2;

/**
 * 具体建造者
 *
 * @Author Small
 * @Date 2020/6/2 14:47
 * @Version 1.0
 **/
public class ConcreteBuilder extends Builder {

    private Product product;
    public ConcreteBuilder() {
        product = new Product();
    }

    @Override
    Builder drawHead(String head) {

        product.setHead(head);
        return this;
    }

    @Override
    Builder drawBody(String body) {
        product.setBody(body);
        return this;
    }

    @Override
    Builder drawHand(String hand) {
        product.setHand(hand);
        return this;
    }

    @Override
    Builder drawFoot(String foot) {
        product.setFoot(foot);
        return this;
    }

    @Override
    Product build() {
        return product;
    }
}
